package org.example.user.service;

import org.example.user.VO.AddressVO;
import org.example.user.model.AddressDO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.example.user.request.AddressAddReqeust;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 电商-公司收发货地址表 服务类
 * </p>
 *
 * @author 神殿骑士
 * @since 2024-04-17
 */
public interface AddressService extends IService<AddressDO> {

    AddressDO detail(long code);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    int add(AddressAddReqeust addressAddRequest);

    int del(long addressId);

    List<AddressVO> listUserAllAddress();
}
